home *** CD-ROM | disk | FTP | other *** search
- <SCRIPT LANGUAGE="JavaScript">
- var strDelim
- var strAnnotation
- var strBehaviour
- var framenames = new Array(50)
-
- strAnnotation ="";
- strBehaviour ="";
- strDelim = "{";
-
- if (navigator.appName.indexOf("Microsoft Internet Explorer") == 0)
- {
-
- /* If IE 4 then Go through all the frames and store it in an array */
-
- if ((navigator.appName.indexOf("Microsoft Internet Explorer") == 0) && (navigator.appVersion.indexOf("4.") == 0))
- {
- var i = parent.frames.length;
- for (var i=0;i<window.parent.frames.length;i++)
- {
- framenames[i]=window.parent.frames(i).name;
- }
- }
- }
-
-
- /******************* Launch URL Script **********************/
-
- function Launch_Url( bstrParam )
- {
- var i = 0;
- var tempParam = bstrParam;
- if( bstrParam.indexOf( "&&") < 0 ) // if there is no target frame, use the default
- {tempParam = bstrParam+"&&"+"%FRAMENAME%";}
-
- strAnnotation = GrabfromParam(tempParam,1,"&&",2);
- ftargetframe = GrabfromParam(tempParam,2,"&&",2);
- i = parent.frames.length;
-
- while( i > 0)
- {
-
- if ((navigator.appName.indexOf("Microsoft Internet Explorer") == 0) && (navigator.appVersion.indexOf("4.") == 0))
- {
- if (eval('framenames[i-1]') == ftargetframe)
- {
- eval('parent.'+framenames[i-1]+'.location = strAnnotation');
- i = 0; }
- }
- else
- { // Netscape 3 & 4
-
- if (navigator.appName.indexOf("Microsoft Internet Explorer") !=0)
- {
- document.DSPlay.LaunchURL(tempParam);
- }
- else
- { // IE 3
- if (parent.frames[i-1].window.name == ftargetframe)
- {
- parent.frames[i-1].window.location = strAnnotation;
- i = 0;
- }
- }
- }
- i= i-1;
- }
- }
-
-
- /************************************************************************
- * JavaScript footer / common functions
- ************************************************************************/
-
- //<-----/// Parse Script Command Parameter ///----->
-
- function GrabfromParam(strParam,intPosition,sdelim,ilen)
- {
- strElement = strParam;
-
- //only left trunc if intPosition > 1
- if( intPosition > 1 ) {
- for( var i = 2; i <= intPosition; i++ ) {
- //truncate left until at the correct position
- if (navigator.userAgent.indexOf("Mozilla") > -1 && (navigator.userAgent.indexOf("3.") > -1 || navigator.userAgent.indexOf("4.") > -1) && navigator.userAgent.indexOf("MSIE") == -1)
- {strElement = strElement.substring( strElement.indexOf(sdelim)+ilen, strElement.length() );}
- else
- {strElement = strElement.substring( strElement.indexOf(sdelim)+ilen, strElement.length );}
- }
- }
-
- //it's at the correct position
- //if there is still another delimiter, truncate right
-
- if( strElement.indexOf( sdelim ) > 0 ) {
- strElement = strElement.substring( 0, strElement.indexOf(sdelim) );
- }
-
- return strElement;
- }
-
-
- // end of JavaScript footer / common functions
- </SCRIPT>